package com.example.mplayer.network

import retrofit2.http.Body
import retrofit2.http.POST

interface CourseService {
    @POST("courses/access")
    suspend fun getCourse(@Body request: EncryptedKeyRequest): CourseResponse
}

data class EncryptedKeyRequest(
    val device_id: String,
    val encrypted_data: String
)

data class CourseResponse(
    val id: String,
    val title: String,
    val chapters: List<ChapterResponse>
)

data class ChapterResponse(
    val id: String,
    val parent_id: String?,
    val title: String,
    val videos: List<VideoResponse>,
    val sub_chapters: List<ChapterResponse>?
)

data class VideoResponse(
    val id: String,
    val title: String,
    val url: String
) 